Skip to content

Webp image loader and EXT_texture_webp#2722

Merged
riccardobl merged 7 commits intojMonkeyEngine:masterfrom
riccardobl:webp
Apr 26, 2026
Merged

Webp image loader and EXT_texture_webp#2722
riccardobl merged 7 commits intojMonkeyEngine:masterfrom
riccardobl:webp

Conversation

@riccardobl
Copy link
Copy Markdown
Member

@riccardobl riccardobl commented Apr 25, 2026

This PR adds a Webp image loader for every platform (was only limited to android before this PR) using a java port of the rust crate image-webp's decoder.
Built on top of #2718

The PR also implements the EXT_texture_webp for the gltf loader.

Closes #2616

@riccardobl riccardobl changed the title Webp image loader Webp image loader and EXT_texture_webp Apr 25, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces new image loaders based on the STB library and WebP decoder, aiming to replace older, platform-specific loaders like HDRLoader, TGALoader, and AWTLoader. It also adds support for the EXT_texture_webp glTF extension. My review highlights a critical thread-safety issue in StbImageLoader due to shared state, a potential loss of precision when loading 32-bit float HDR images, and a recommendation to improve memory efficiency by avoiding intermediate heap allocations during stream reading. Additionally, I suggest refining the exception handling in WebpImageLoader to avoid catching generic exceptions.

Comment thread jme3-plugins/src/main/java/com/jme3/texture/plugins/StbImageLoader.java Outdated
@riccardobl riccardobl merged commit e54d8da into jMonkeyEngine:master Apr 26, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebP support on desktop

1 participant